<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>添加入库单</title>
		<link rel="stylesheet" type="text/css" href="../../css/style.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/form.css"/>
		<!--<link rel="stylesheet" type="text/css" href="../../css/layui.css"/>-->
		<link rel="stylesheet" type="text/css" href="../../css/jquery-ui.css" />

	</head>
	<body>
		<!-- 蓝色背景区域 -->
		<div class="wrap">
			<!-- 白色可用区域 -->
			<div class="canuse">
				<!------ 位置 ------>
	            <p class="contentText local"><span>位置：库存日常管理 > 入库管理 > 添加物料入库单</span></p>
	            
				<!------ tab标签 ------>
	            <!--<div class="layui-tab layui-tab-card">
				    <ul class="layui-tab-title">
					    <li class="layui-this">新建入库单</li>
					    <li>审核入库单</li>
				    </ul>
					<div class="layui-tab-content">
					    <div class="layui-tab-item layui-show">-->
					    	
					    	<div class="article_list" style="width: 98.5%; margin: 0px auto;">
					            <!------- 内容 ------->
					            <div class="content content1">
					            	<!-- 用户列表内容区 -->
					                <div class="con con_01">
					                    <!-- 表单信息填写区 -->
					                    <h4 class="sel_title"><img src="../../img/list/brand1.png" /><span>新建物料入库单</span></h4>
					                    <div class="write_area">
					                        <form id="addFrom" action="" method="post">
					                            <table class="contentText" border="1" cellspacing="0" cellpadding="0" width="99%" style="margin-bottom: 10px;">
					                                <tbody>
					                                    <tr>
					                                        <th>入库单号：</th>
					                                        <td><input type="text" name="" value="RKDH20180910180015" /></td>
					                                        <th>入库日期：</th>
					                                        <td><input type="text" name="" value="2018-09-10" /></td>
					                                        <th>制单人：</th>
					                                        <td><input type="text" name="" value="超级管理员" /></td>
					                                    </tr>
					                                    <tr>
					                                        <th>申领单号：</th>
					                                        <td><input type="text" name="" value="" /></td>
					                                        <th>申领部门：</th>
					                                        <td><input type="text" name="" value="" /></td>
					                                        <th>申领人：</th>
					                                        <td><input type="text" name="" value="" /></td>
					                                    </tr>
					                                 
					                                </tbody>
					                            </table>
					                        </form>
					                    </div>
					                </div>
									<!-- 列表展示区 -->
									<div class="table_border">
						                <div class="show_list">
						                	<div class="title_operate">
						                    	<h4 class="sel_title"><img src="../../img/list/brand1.png" /><span>二级库物料入库单</span></h4>
						                		
						                        <!-- 操作类型区 -->
						                        <div class="operate_area" id="addOperate">
						                        	<!--<a onclick="addTwocode();" id="printTwocode" class="bgd_blue_five img_hand">打印二维码</a>
						                            <a id="addDetail" onclick="addDetail()" class="bgd_add_detail img_hand">扫码添加</a> -->
						                            <a id="addDetail" onclick="addDetail()" class="bgd_add img_hand">增加</a> 
						                            <a id="deleteDetail" onclick="deleteDetail()" class="bgd_delete img_hand">删除</a> 
						                        </div>
						                	</div>
						                	<div class="list_area">
						                        <!-- 信息列表区 -->
						                        <div class="info_area">
						                            <table class="tablelist" border="1" cellspacing="0" cellpadding="0">
						                                <tbody>
						                                    <tr class="menuText list_head">
						                                    	<th class="checkSelectAll"></th>
						                                        <th class="">序号</th>
						                                        <th class="">物料编码</th>
						                                        <th class="">物料名称</th>
						                                        <th class="">物料类型</th>
						                                        <th class="">物料规格</th>
						                                        <th class="">物料型号/牌号/材料</th>
						                                        <th class="">入库数量</th>
						                                        <th class="">单位</th>
						                                        <th class="">批次号</th>
						                                        <th class="">库存位置</th>
						                                        <th class="">生产日期</th>
						                                        <th class="">失效日期</th>
						                                        <th class="">供应商</th>
						                                    </tr>
						                                </tbody>
						                                <tbody class="tablelist" id="addTr">
						                                    <tr class="listTableText list_list">
						                                        <td><input type="checkbox" class="input_checkBox" name="" id="" value=""></td>
						                                        <td>1</td>
						                                        <td><input style="width: 100px;" type="text" name="" value="" /></td>
						                                        <td><input style="width: 100px;" type="text" name="" value="" /></td>
						                                        <td><input style="width: 100px;" type="text" name="" value="" /></td>
						                                        <td><input style="width: 100px;" type="text" name="" value="" /></td>
						                                        <td><input style="width: 100px;" type="text" name="" value="" /></td>
						                                        <td><input style="width: 100px;" type="text" name="" value="" /></td>
						                                        <td><input style="width: 50px;" type="text" name="" value="" /></td>
																<td><input style="width: 100px;" type="text" name="" value="" /></td>
						                                        <td><input style="width: 100px;" type="text" name="" value="" /></td>
						                                        <td><input style="width: 80px;" type="text" name="" class="dateControl" id="dateControl" readonly="readonly" /></td>
						                                        <td><input style="width: 80px;" type="text" name="" class="dateControl" id="dateControl1" readonly="readonly" /></td>
						                                        <td><input style="width: 100px;" type="text" name="" value="" /></td>
						                                    </tr>
						                                </tbody>
						
						                            </table>
						                        </div>
						                        <!-- 确定按钮 -->
						                        <div class="certainBtn">
						                        	<a href="" class="bgd_blue_two img_hand">确定</a> 
						                            <a href="instockList.html" class="bgd_white_two img_hand">返回</a> 
						                        </div>
						                        <!-- 页码区域 -->
							                    <!--<div class="page_area contentText clear">
							                    	<div class="page_sum">
							                    		共<span class="page_number"> 3 </span>页&emsp;每页 10 条&emsp;共<span class="info_sum"> 27 </span>条记录
							                    	</div>
							                        <div class="page-pull-right async-page">
							                            <button>首页</button>
							                            <button>&lt;&lt;</button>
							                            <button class="select_page">1</button>
							                            <button>2</button>
							                            <button>3</button>
							                            <button>&gt;&gt;</button>
							                            <button>尾页</button>
							                        </div>
							                    </div>-->
						                    </div>
						                </div>
									</div>
					            </div>
					        </div>
					        
					    <!--</div>-->
					    <!--<div class="layui-tab-item">
					    	<div class="article_list">
					            <div class="content content1">
					                <div class="con con_01">
					                    <h4 class="sel_title"><img src="../../img/list/brand1.png" /><span>审核物料入库单</span></h4>
					                    <div class="write_area">
					                        <form id="addFrom" action="" method="post">
					                            <table class="contentText" border="1" cellspacing="0" cellpadding="0" width="99%" style="margin-bottom: 10px;">
					                                <tbody>
					                                    <tr>
					                                        <th>入库单号：</th>
					                                        <td>20180405</td>
					                                        <th>入库时间：</th>
					                                        <td>2018/04/05</td>
					                                        <th>制单人：</th>
					                                        <td>XXX</td>
					                                    </tr>
					                                    <tr>
					                                        <th>申领单号：</th>
					                                        <td>2004462158</td>
					                                        <th>申领部门：</th>
					                                        <td>XX部门</td>
					                                        <th>申领人：</th>
					                                        <td>XXX</td>
					                                    </tr>
					                                    <tr>
					                                        <th>审核人：</th>
					                                        <td colspan="5">二级库车间主任</td>
					                                    </tr>
					                                    <tr>
					                                        <th>审核建议：</th>
					                                        <td colspan="5"><textarea style="width: 90%; height: 50px;"></textarea></td>
					                                    </tr>
					                                </tbody>
					                            </table>
					                        </form>
					                    </div>
					                </div>
									<div class="table_border">
						                <div class="show_list">
						                	<div class="title_operate">
						                    	<h4 class="sel_title"><img src="../../img/list/brand1.png" /><span>物料详细信息</span></h4>
						                	</div>
						                	<div class="list_area">
						                        <div class="info_area">
						                            <table class="tablelist" border="1" cellspacing="0" cellpadding="0">
						                                <tbody>
						                                    <tr class="menuText list_head">
						                                        <th class="">序号</th>
						                                        <th class="">物资编码</th>
						                                        <th class="">物资名称</th>
						                                        <th class="">物资规格</th>
						                                        <th class="">物资型号/牌号/材料</th>
						                                        <th class="">需求数量</th>
						                                        <th class="">入库数量</th>
						                                        <th class="">单位</th>
						                                        <th class="">批次号</th>
						                                    </tr>
						                                </tbody>
						                                <tbody class="tablelist" id="metailInfo">
						                                    <tr class="listTableText list_list">
						                                        <td>RKDdfa324</td>
						                                        <td>SFD786230</td>
						                                        <td>10K</td>
						                                        <td>XH1005</td>
						                                        <td>100</td>
						                                        <td>盒</td>
						                                        <td>500</td>
						                                        <td>H001</td>
						                                        <td>PCH001</td>
						                                    </tr>
						                                    <tr class="listTableText list_list">
						                                        <td>RKDdfa324</td>
						                                        <td>SFD786230</td>
						                                        <td>10K</td>
						                                        <td>XH1005</td>
						                                        <td>100</td>
						                                        <td>盒</td>
						                                        <td>500</td>
						                                        <td>H001</td>
						                                        <td>PCH001</td>
						                                    </tr>
						                                    <tr class="listTableText list_list">
						                                        <td>RKDdfa324</td>
						                                        <td>SFD786230</td>
						                                        <td>10K</td>
						                                        <td>XH1005</td>
						                                        <td>100</td>
						                                        <td>盒</td>
						                                        <td>500</td>
						                                        <td>H001</td>
						                                        <td>PCH001</td>
						                                    </tr>
						                                    <tr class="listTableText list_list">
						                                        <td>RKDdfa324</td>
						                                        <td>SFD786230</td>
						                                        <td>10K</td>
						                                        <td>XH1005</td>
						                                        <td>100</td>
						                                        <td>盒</td>
						                                        <td>500</td>
						                                        <td>H001</td>
						                                        <td>PCH001</td>
						                                    </tr>
						                                    <tr class="listTableText list_list">
						                                        <td>RKDdfa324</td>
						                                        <td>SFD786230</td>
						                                        <td>10K</td>
						                                        <td>XH1005</td>
						                                        <td>100</td>
						                                        <td>盒</td>
						                                        <td>500</td>
						                                        <td>H001</td>
						                                        <td>PCH001</td>
						                                    </tr>
						                                </tbody>
						
						                            </table>
						                        </div>
						                        <div class="certainBtn">
						                        	<a href="" class="bgd_blue_four img_hand">提交审核</a> 
						                            <a href="instockList.html" class="bgd_white_two img_hand">返回</a> 
						                        </div>
						                    </div>
						                </div>
									</div>
					            </div>
					        </div>
					    </div>-->
				    <!--</div>
				    
				</div>-->
	            
			</div>
			
			<!-- 版尾  -->
			<div class="ending">
				Copyright© 2017-2018 西安磐基新能源科技有限公司
			</div>
			
			<!-- 打印二维码 -->
			<div class="mask hidden">
				<div class="printDiv">
					<h4 class="printTitle">
						物料二维码
						<img onclick="backTwocode();" src="../../img/list/delete.png"/>
					</h4>
					<div class="twocodeDiv">
						 <div class="twocodeMoudle">
						 	<img src="../../img/list/twocode.png"/>
						 	<p>物料名称</p>
						 </div>
						 <div class="twocodeMoudle">
						 	<img src="../../img/list/twocode.png"/>
						 	<p>物料名称</p>
						 </div>
						 <div class="twocodeMoudle">
						 	<img src="../../img/list/twocode.png"/>
						 	<p>物料名称</p>
						 </div>
						 <div class="twocodeMoudle">
						 	<img src="../../img/list/twocode.png"/>
						 	<p>物料名称</p>
						 </div>
						 <div class="twocodeMoudle">
						 	<img src="../../img/list/twocode.png"/>
						 	<p>物料名称</p>
						 </div>
						 <div class="twocodeMoudle">
						 	<img src="../../img/list/twocode.png"/>
						 	<p>物料名称</p>
						 </div>
						 <div class="twocodeMoudle">
						 	<img src="../../img/list/twocode.png"/>
						 	<p>物料名称</p>
						 </div>
						 <div class="twocodeMoudle">
						 	<img src="../../img/list/twocode.png"/>
						 	<p>物料名称</p>
						 </div>
						 <div class="twocodeMoudle">
						 	<img src="../../img/list/twocode.png"/>
						 	<p>物料名称</p>
						 </div>
						 <div class="twocodeMoudle">
						 	<img src="../../img/list/twocode.png"/>
						 	<p>物料名称</p>
						 </div>
						 <div class="twocodeMoudle">
						 	<img src="../../img/list/twocode.png"/>
						 	<p>物料名称</p>
						 </div>
						 <div class="twocodeMoudle">
						 	<img src="../../img/list/twocode.png"/>
						 	<p>物料名称</p>
						 </div>
					</div>
					<!-- 确定按钮 -->
                    <div class="certainBtn">
                    	<a href="" class="bgd_blue_two img_hand">确定</a> 
                        <a onclick="backTwocode();" class="bgd_white_two img_hand">返回</a> 
                    </div>
				</div>
			</div>
			
		</div>
	</body>
	<script src="../../js/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>
	<!--<script src="../../js/layui.js" type="text/javascript" charset="utf-8"></script>-->
	<script src="../../js/jquery-ui.js" type="text/javascript"></script>
	<script type="text/javascript">
		var h = document.documentElement.clientHeight;
		$(".wrap").css("height", h);
		
		// 获取每行 td 的兄弟节点
		$("#metailInfo td").hover(   
			function () {      
				$(this).parent().children().addClass("td_hover");
			},    
			function () {      
				$(this).parent().children().removeClass("td_hover");  
			}
		);
		
		// 日期控件
		$(function(){
	        $(".dateControl").datepicker({
	        	dateFormat : 'yy-mm-dd',
	            monthNamesShort:["January","February","March","April","May","June", "July","August","September","October","November","December"],
	 		 	changeYear:true,
	 		 	changeMonth:true,
	 		 	showOn:"button",
	 		 	buttonImage:"../../img/button/calendar.png",
	 		 	buttonImageOnly:false
	        });
	     });
		
		
		//打印二维码
		function addTwocode(){
			$(".mask").css("display", "block");
		}
		//返回增加列表
		function backTwocode(){
			$(".mask").css("display", "none");
		}
		
		//-------- 增加明细 ---------
	    function addDetail() {
	        var trInt = $("#addTr").find("tr").length;
			var no = trInt + 1;// 序号
	        
	        var dom = "<tr class='contentText list_list'><td><input type='checkbox' class='input_checkBox' name='' id='' value=''></td>";
	        dom += "<td>" + no + "</td>";
	        dom += "<td><input style='width: 100px;' type='text' name='' value=''></td>";
	        dom += "<td><input style='width: 100px;' type='text' name='' value=''></td>";
	        dom += "<td><input style='width: 100px;' type='text' name='' value=''></td>";
	        dom += "<td><input style='width: 100px;' type='text' name='' value=''></td>";
	        dom += "<td><input style='width: 100px;' type='text' name='' value=''></td>";
	        dom += "<td><input style='width: 100px;' type='text' name='' value=''></td>";
	        dom += "<td><input style='width: 50px;' type='text' name='' value=''></td>";
	        dom += "<td><input style='width: 100px;' type='text' name='' value=''></td>";
	        dom += "<td><input style='width: 100px;' type='text' name='' value=''></td>";
	        dom += "<td><input style='width: 80px;' type='text' class='dateControl' name='' value=''></td>";
	        dom += "<td><input style='width: 80px;' type='text' class='dateControl' name='' value=''></td>";
	        dom += "<td><input style='width: 100px;' type='text' name='' value=''></td></tr>";
	        
			$(function(){
		        $(".dateControl").datepicker({
		        	dateFormat : 'yy-mm-dd',
		            monthNamesShort:["January","February","March","April","May","June", "July","August","September","October","November","December"],
		 		 	changeYear:true,
		 		 	changeMonth:true,
		 		 	showOn:"button",
		 		 	buttonImage:"../../img/button/calendar.png",
		 		 	buttonImageOnly:false
	        	});
	     	});	        
	        
	        $("#addTr").append(dom);
	    }
		
		//-------- 删除明细 ---------
	    function deleteDetail() {
	        var checks = $("input[type='checkbox']:checked");
	        if (checks.length == 0) {
	            $("#addTr").find("tr:last").remove();
	        } else {
	            $.each(checks, function(item, obj) {
	                $(obj).parent().parent().remove();
	            });
	        }
	    }


		
//		layui.use('element', function(){
//			var $ = layui.jquery, 
//			    element = layui.element; 
//			  
//		   
//		    var active = {
//			    tabAdd: function(){
//			       
//			        element.tabAdd('demo', {
//			        	title: '新选项'+ (Math.random()*1000|0), 
//			        	content: '内容'+ (Math.random()*1000|0),
//			        	id: new Date().getTime() 
//			        })
//			    },
//			    tabChange: function(){
//			       
//			        element.tabChange('demo', '22'); 
//			    }
//		    };
//		  
//		    $('.site-demo-active').on('click', function(){
//		    	var othis = $(this), 
//		        	type = othis.data('type');
//		    	active[type] ? active[type].call(this, othis) : '';
//		    });
//		  
//		   
//		    var layid = location.hash.replace(/^#test=/, '');
//		    element.tabChange('test', layid);
//		  
//		    element.on('tab(test)', function(elem){
//		   		location.hash = 'test='+ $(this).attr('lay-id');
//		    });
//		});
		
	</script>
</html>
